$(function()
{
//首页区县 filter_area
$(".filter_area li a").click(function(event) {
	var searchkey=$(this).html();
	$.ajax({
        type: "POST",
        url: "/FullSearch",
        data: {searchs:searchkey},
        dataType: "json",
        success: function(data){
        	if (data.report==0) {
        		window.location.href="/r/cms/www/default/school/school_list.html";
			}else{
				alert("未找到相应的数据！");
			}
        }
	}); 
});

//首页学校 private_school
$(".private_school li a").click(function(event) {
	var detailname=$(this).html();
	$.ajax({
		type: "POST",
	    url: "/IndexSchoolDetail",
	    data: {schoolname:detailname},
        dataType: "json",
        success: function(data){
        	if (data.report==0) {
        		window.location.href="/r/cms/www/default/school/school_detail.html";
			}else{
				alert("未找到相应的数据！");
			}
        }
	}); 
});

});

//学校级别list页
function showlevels(level){
	$.ajax({
        type: "POST",
        url: "/ShowSchoolTypeAll",
        data: {schooltype:level},
        dataType: "json",
        success: function(data){
        	if (data.report==0) {
        		window.location.href="/r/cms/www/default/school/school_list.html";
			}else{
				alert("未找到相应的数据！");
			}
        }	
	});
}

//全局搜索
function gosearch1(){
	var searchkey=$.trim($("#searchvalue1").val());
	$.ajax({
        type: "POST",
        url: "/FullSearch",
        data: {searchs:searchkey},
        dataType: "json",
        success: function(data){
        	if (data.report==0) {
        		window.location.href="/r/cms/www/default/school_list.html";
			}else{
				alert("未找到相应的数据！");
			}
        }
	}); 	
};